Skip to content

Added turborepo and prisma docs #1807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 20, 2025
Merged

Added turborepo and prisma docs #1807

merged 6 commits into from
Mar 20, 2025

Conversation

D-K-P
Copy link
Member

@D-K-P D-K-P commented Mar 20, 2025

Added two different examples of how to setup a monorepo with prisma and trigger.dev

Summary by CodeRabbit

  • Documentation
    • Added a new guide showcasing a Turborepo monorepo setup with Prisma, detailing its architecture and usage.
    • Expanded the example projects section with the new monorepo guide.
    • Enhanced the introductory content with additional Python resources covering image processing, web crawling, and PDF form extraction, along with updated formatting for clarity.

Copy link

changeset-bot bot commented Mar 20, 2025

⚠️ No Changeset found

Latest commit: c4d2462

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "proxy" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

Copy link
Contributor

coderabbitai bot commented Mar 20, 2025

Walkthrough

The pull request updates the documentation by adding a new guide for a Turborepo monorepo with Prisma. A new entry is included in the JSON file for example projects, and a dedicated MDX file explains two example projects that integrate Prisma and Trigger.dev. Additionally, the introduction guide is updated with new Python guides and reformatted tables, along with an entry for the Turborepo monorepo project.

Changes

File(s) Change Summary
docs/docs.json Added a new entry in the "Example projects" section linking to the Turborepo monorepo with Prisma guide.
docs/guides/.../turborepo-monorepo-prisma.mdx Introduced a new documentation file outlining two example projects using Prisma and Trigger.dev in a Turborepo monorepo setup, detailing project structure and configuration differences.
docs/guides/.../introduction.mdx Updated the guides section with three new Python guides (image processing, web crawler, PDF form extractor) and added an example project entry for the Turborepo monorepo with Prisma, with minor table reformatting for consistency.

Possibly related PRs

Suggested reviewers

  • matt-aitken
  • nicktrn

Poem

Hop, hop, here comes a brand new guide,
In docs we trust, with code as our pride.
A Turborepo tale spun with Prisma grace,
New Python guides join the chase.
I'm a jittery rabbit, dancing on keys,
Celebrating docs that aim to please!
🐇✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
docs/guides/example-projects/turborepo-monorepo-prisma.mdx (1)

7-10: Consider refining the overview sentence.
The overview on line 9 reads:

"These examples demonstrate two different ways to use Prisma and Trigger.dev in a Turborepo monorepo. They both trigger a task from a Next.js app using a server action, and then use Prisma to add a user to a database table, however they differ in how Trigger.dev is installed and configured."

Using "however" as a conjunction here can be a little jarring. Consider replacing it with "but" (or restructuring the sentence) for improved clarity. For example:

- ... database table, however they differ in how Trigger.dev is installed and configured.
+ ... database table, but they differ in how Trigger.dev is installed and configured.
🧰 Tools
🪛 LanguageTool

[typographical] ~9-~9: The word “however” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...Prisma to add a user to a database table, however they differ in how Trigger.dev is insta...

(HOWEVER_SENTENCE)

docs/guides/introduction.mdx (1)

42-42: Typo in the description of example projects.
The sentence "These are a great way of learning how to encorporate Trigger.dev into your project." contains a typo. Consider replacing "encorporate" with "incorporate."

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1eb3fb3 and 03cb76f.

📒 Files selected for processing (3)
  • docs/docs.json (1 hunks)
  • docs/guides/example-projects/turborepo-monorepo-prisma.mdx (1 hunks)
  • docs/guides/introduction.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/guides/introduction.mdx

[uncategorized] ~36-~36: ‘In’ is unnecessary in most cases before the expression ‘next .’.
Context: ... | Trigger tasks from a webhook in Next.js | | [Us...

(CONFUSION_OF_NN_IN_NEXT_NNP)

docs/guides/example-projects/turborepo-monorepo-prisma.mdx

[typographical] ~9-~9: The word “however” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ...Prisma to add a user to a database table, however they differ in how Trigger.dev is insta...

(HOWEVER_SENTENCE)


[uncategorized] ~22-~22: Possible missing comma found.
Context: ...riggered by a button click in a Next.js app which triggers the task via a server ac...

(AI_HYDRA_LEO_MISSING_COMMA)


[typographical] ~97-~97: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ..., you have to add a package.json file first, otherwise it will attempt to add Trigger.dev file...

(THUS_SENTENCE)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (3)
docs/docs.json (1)

311-319: New example project entry added in JSON.
The new guide entry "guides/example-projects/turborepo-monorepo-prisma" has been added to the "Example projects" list. This aligns perfectly with the PR objectives of adding the Turborepo monorepo with Prisma docs. Please verify that the ordering and formatting are consistent with the other entries.

docs/guides/example-projects/turborepo-monorepo-prisma.mdx (1)

1-5: Frontmatter is well structured.
The frontmatter provides a clear title, sidebarTitle, and description for the new guide. The details are concise and match the PR objectives.

docs/guides/introduction.mdx (1)

44-48: New example project row added for Turborepo monorepo with Prisma.
The table row for "Turborepo monorepo with Prisma" has been added within the Example projects section with a clear description and a GitHub link. This addition enhances the diversity of examples available to users and is consistent with the PR objectives.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
docs/guides/example-projects/turborepo-monorepo-prisma.mdx (2)

20-23: Example 1 Introduction – Consider a Minor Punctuation Improvement

The description for Example 1 is detailed and clear. For enhanced readability, consider adding a comma after “a Next.js app” in the sentence:

Current:
“…button click in a Next.js app which triggers the task via a server action.”

Suggested:
“…button click in a Next.js app, which triggers the task via a server action.”

This small change improves the sentence flow.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...riggered by a button click in a Next.js app which triggers the task via a server ac...

(AI_HYDRA_LEO_MISSING_COMMA)


94-96: Refine Note Wording in Tasks Package Note

Within the note that explains the setup for running pnpm dlx trigger.dev@latest init, consider revising the sentence for enhanced clarity. For example, changing:

Current:
“…you have to add a package.json file first, otherwise it will attempt to add Trigger.dev files in the root of your monorepo.”

Suggested:
“…you have to add a package.json file first; otherwise, it will attempt to add Trigger.dev files to the root of your monorepo.”

This adjustment helps separate the two ideas and improves overall readability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 03cb76f and c4d2462.

📒 Files selected for processing (1)
  • docs/guides/example-projects/turborepo-monorepo-prisma.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/guides/example-projects/turborepo-monorepo-prisma.mdx

[uncategorized] ~22-~22: Possible missing comma found.
Context: ...riggered by a button click in a Next.js app which triggers the task via a server ac...

(AI_HYDRA_LEO_MISSING_COMMA)


[typographical] ~97-~97: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ..., you have to add a package.json file first, otherwise it will attempt to add Trigger.dev file...

(THUS_SENTENCE)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (13)
docs/guides/example-projects/turborepo-monorepo-prisma.mdx (13)

1-5: Front Matter is Clear and Informative

The YAML front matter (title, sidebarTitle, description) clearly outlines the document’s purpose and should help with proper navigation in the docs sidebar.


7-13: Overview Section Effectively Introduces the Examples

The “Overview” section succinctly explains that two different monorepo setups are demonstrated. This provides readers with context for what to expect in the document.


14-18: Note Block is Helpful for Guidance

The initial note clarifies that users can either fork the repositories or inspect the project structures. Its presentation is straightforward.


24-35: GitHub Repository Card for Example 1 is Well-Structured

The Card component clearly displays the GitHub repo details and provides a direct call-to-action for users. Its structure is consistent and intuitive.


37-44: Features List for Example 1 is Comprehensive

The bullet points efficiently communicate the critical aspects of the monorepo (use of Turborepo CLI, pnpm, separation of tasks and database packages, etc.). This section helps readers quickly assess the tools and technologies used.


45-83: Project Structure Diagram is Informative

The ASCII diagram detailing the project structure is an excellent visual aid. It clearly separates the apps and packages, which is vital for understanding a monorepo layout.

Action: Please verify that the code block renders correctly in the MDX environment.


86-111: Relevant Files and Code Section is Detailed

This section provides useful links and explanations for key components (database and tasks packages, and the Next.js app). The detailed breakdown assists readers in locating critical configuration and implementation files.

🧰 Tools
🪛 LanguageTool

[typographical] ~97-~97: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ..., you have to add a package.json file first, otherwise it will attempt to add Trigger.dev file...

(THUS_SENTENCE)


117-120: Running the Example Section Provides Clear Next Steps

Linking to the full instructions in the GitHub repo README is a practical choice. It directs users efficiently to more detailed guidance for setup and execution.


121-124: Example 2 Introduction is Clear and Distinct

The introduction to Example 2 clearly differentiates it from Example 1 by specifying that Trigger.dev is installed directly within the Next.js app. This clarification helps set the right expectations.


125-137: GitHub Repository Card for Example 2 is Consistent

The Card component for Example 2 mirrors the design of Example 1’s card. This consistency enhances the overall user experience and navigation across examples.


138-144: Features List for Example 2 is Well-Outlined

The features list for Example 2 effectively summarizes the unique aspects of this setup. It clearly outlines the integration differences without redundancy.


146-177: Project Structure Diagram for Example 2 is Clearly Presented

The second ASCII diagram accurately illustrates the structure for Example 2. Like the first diagram, it demarcates the various components (Next.js app, docs, and packages) effectively.

Action: Double-check that the diagram renders correctly in the final MDX format.


179-196: Relevant Files and Code for Example 2 is Comprehensive

The detailed breakdown of key files for the database package and Next.js app—including configuration files and task definitions—provides thorough guidance for users looking to replicate the setup.

@D-K-P D-K-P merged commit adca199 into main Mar 20, 2025
7 checks passed
@D-K-P D-K-P deleted the docs/monorepo-examples branch March 20, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants